package com.dlnu.sujiwords.domain.client;

import lombok.Data;

@Data
public class AjaxResult {
    private String msg;

    private Object data;

    public AjaxResult(String msg, Object data) {
        this.msg = msg;
        this.data = data;
    }

    public AjaxResult(String msg){
        this.msg = msg;
    }

    public AjaxResult() {
    }

    public static AjaxResult success(String msg,Object data){
        return new AjaxResult(msg,data);
    }
    public static AjaxResult success(String msg){
        return new AjaxResult(msg);
    }

    @Override
    public String toString() {
        return "AjaxResult{" +
                "msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
